
import re
import string
import pepe.p_txt.bigtxt as bt

o = open('R01_EKPO_AT00_2007to2010.dmp_', 'wb')

r = {}

o = open('a.txt', 'wb')

for line in bt.lines('R01_EKPO_AT00_2007to2010.dmp'):

    for c in line:
        if r.has_key(c):
            r[c] += 1
        else:
            r[c] = 1
    #line = re.sub('\x00', '\t', line)
    #o.write(line)

for k in r.keys():
    print k, r[k]
    o.write('%s\t%s\x0D\x0A' % (k, r[k]))

o.close()
